package com.yuhong.springbootinit.model.vo;

import com.yuhong.springbootinit.model.entity.Application;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.Date;

@Data
public class ApplicationVO {


    private Long id;

    /**
     *
     */
    private String profileId;

    /**
     * 发起人的id
     */
    private String userId;

    /**
     * 发起人的name
     */
    private String userName;

    /**
     *
     */
    private String positionId;

    /**
     *
     */
    private String positionName;

    /**
     *
     */
    private String companyId;

    /**
     *
     */
    private String companyName;



    private Integer status;


    private Date createTime;


    private String location;


    private String bg;


    private String gen;


    /**
     * 对象转包装类
     *
     * @param application
     * @return
     */
    public static ApplicationVO objToVo(Application application){
        if (application == null) {
            return null;
        }
        ApplicationVO applicationVO = new ApplicationVO();
        BeanUtils.copyProperties(application, applicationVO);

        return applicationVO;
    }
}
